using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.ICM
{
 
	[DataContract, Table("IcmInventoryRepair")]
    public class InventoryRepair
    {
		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "RepairId", ResourceType = typeof(Resources.InventoryRepairResource))]
        public int RepairId { get; set; }

		[DataMember, Display(Name = "AssetCode", ResourceType = typeof(Resources.InventoryRepairResource))]
        public string AssetCode { get; set; }

		[ForeignKey("DealerRepair")]
		[DataMember, Display(Name = "DealerRepairId", ResourceType = typeof(Resources.InventoryRepairResource))]
        public Nullable<int> DealerRepairId { get; set; }

		[ForeignKey("JobSite")]
		[DataMember, Display(Name = "JobSiteId", ResourceType = typeof(Resources.InventoryRepairResource))]
        public Nullable<int> JobSiteId { get; set; }

        [ForeignKey("Warehouse")]
		[DataMember, Display(Name = "WhId", ResourceType = typeof(Resources.InventoryRepairResource))]
        public Nullable<int> WhId { get; set; }

		[DataMember, Display(Name = "RepairDate", ResourceType = typeof(Resources.InventoryRepairResource))]
        public Nullable<System.DateTime> RepairDate { get; set; }

		[DataMember, Display(Name = "RepairDescr", ResourceType = typeof(Resources.InventoryRepairResource))]
        public string RepairDescr { get; set; }

		[DataMember, Display(Name = "Cause", ResourceType = typeof(Resources.InventoryRepairResource))]
        public string Cause { get; set; }

		[DataMember, Display(Name = "RepairRemark", ResourceType = typeof(Resources.InventoryRepairResource))]
        public string RepairRemark { get; set; }

		[DataMember, Display(Name = "ReceiveDate", ResourceType = typeof(Resources.InventoryRepairResource))]
        public Nullable<System.DateTime> ReceiveDate { get; set; }

		[DataMember, Display(Name = "RepairAmount", ResourceType = typeof(Resources.InventoryRepairResource))]
        public Nullable<double> RepairAmount { get; set; }

		[DataMember, Display(Name = "RepairDiscount", ResourceType = typeof(Resources.InventoryRepairResource))]
        public Nullable<double> RepairDiscount { get; set; }

        [ForeignKey("MasRepairStatus")]
		[DataMember, Display(Name = "RepairStatus", ResourceType = typeof(Resources.InventoryRepairResource))]
        public int RepairStatus { get; set; }

		[DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.InventoryRepairResource))]
        public string RecordStatus { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.InventoryRepairResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.InventoryRepairResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.InventoryRepairResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.InventoryRepairResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        [DataMember]
        public virtual ICM.MasContact DealerRepair { get; set; }

        [DataMember]
        public virtual HRM.JobSite JobSite { get; set; }

        [DataMember]
        public virtual Warehouse Warehouse { get; set; }

        [DataMember]
        public virtual IcmMasLookUp MasRepairStatus { get; set; }

    }
}